$(function () {
    var mytoken = localStorage.getItem('mytoken')
    if (!mytoken) {
        location.href = './login.html'
    }
    $('.layui-theone').click(function (e) {
        e.preventDefault()
        layer.confirm('确认退出吗?', { icon: 3, title: '提示' }, function (index) {
            localStorage.removeItem('mytoken')
            layer.close(index)
            location.href = './login.html'
        });
    })
})